﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace Model
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	internal class CmdCableTrayFittingSet : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			Transaction transaction = new Transaction(commandData.Application.ActiveUIDocument.Document, "CableTrayFittingSet");
			transaction.Start();
			new CableTrayFittingSet(commandData.Application, transaction).ShowDialog();
			transaction.Commit();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
